/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mcet;

import java.util.ArrayList;
import java.util.HashMap;


public class Table {
    
    private HashMap<String,String> columns;
    private ArrayList<String> columnName;
    private ArrayList<ArrayList<String>> outlierData;

    
    private String tableName;
    
    private ArrayList<ArrayList<String>> possibleValue;
    private Table(){
        
    }
    public Table(String tableName) {
        columns = new HashMap<String, String>();
        columnName = new ArrayList<String>();
        this.tableName = tableName;
        this.outlierData = new ArrayList<ArrayList<String>>();
        this.possibleValue = new ArrayList<ArrayList<String>>();
    }
    public void setColumn(String columnName,String dataType){
        columns.put(columnName, dataType);
        this.columnName.add(columnName);
        
    }
    
    public int getColumnCount(){
        return columns.size();
    }
    
    public String getType(int i) {
        
        String typeStr = columns.get(this.columnName.get(i));
        return typeStr;
    }
    
    public String getColumnName(int i) {
        
       return this.columnName.get(i);
       
    }
    
     public ArrayList<String> getColumns() {
        return columnName;
    }
     
     public void setOutlier(ArrayList<String> data) {
         this.outlierData.add(data);
     }
     
    public ArrayList<ArrayList<String>> getOutlierData() {
        return outlierData;
    }

    public String getTableName() {
        return tableName;
    } 
    
    public void deleteData(int index){
        outlierData.remove(index);
    }
    
    public void setPossibleValue(ArrayList<String> values) {
        possibleValue.add(values);
    }
    public ArrayList<String> getPossibleValue(int index) {
        return possibleValue.get(index);
    }

            
    
}
